const { sequelize } = require('../config/db');
const { DataTypes } = require('sequelize');

// 定义图片模型
const Image = sequelize.define('Image', {
 id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true
  },
  image: {
    type: DataTypes.STRING,
    allowNull: false
  }
}, {
  tableName: 'images',
  timestamps: true,
  indexes: [] 
});

// 导出所有模型
module.exports = {
  Image,
  sequelize 
};